<?php 
//本文件：删除功能************
include '../../functions.php';
//1.载入数据库
$data = include './data.php';
//2.删除指定留言
//获得要删除的留言的下标
$id = intval($_GET['id']);
unset($data[$id]);
//3.写入数据库
file_put_contents('./data.php', "<?php\r\nreturn " . var_export($data,true) . "\r\n?>");
//4.成功提示
success('删除成功', 'index.php');






//$arr = array('a','b','c');
//unset($arr[1]);
//print_r($arr);


 ?>